SYSTEM_NAME=openwechat

GOBASE=$(shell pwd)
GOBIN=$(GOBASE)/bin

.PHONY: build
build:
	CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o $(GOBIN)/app ./main.go

.PHONY: start
start:
	go build -o $(GOBIN)/app ./main.go
	./bin/app

.PHONY: docker
docker:
	make build
	docker build -t chat:v1.0 .
	docker tag chat:v1.0 chenlei888/chat:v1.0
	docker push chenlei888/chat:v1.0